#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
extern char** environ;

int main()
{
    char* const argv[] = 
    {
        "printenv",
        NULL
    };
    char* const envp[]=
    {
        "PATH=0000",
        "VAL=1111",
        NULL
    };
    char* newenv = "VAL2=2222";
    putenv(newenv);
    printf("before exec\n");
    execvpe("printenv", argv, environ);
    //execvpe("ls", argv, environ);
    //execl("./mybincc", "mybincc", NULL);
    //execl("/usr/bin/bash", "bash", "test.sh", NULL);
    
    //execvp("ls", argv);
    //execv("/usr/bin/ls", argv);
    //execlp("ls","ls", "-l", "-a", NULL);
    //execl("/usr/bin/ls","ls", "-l", "-a", NULL);
    printf("after exec\n");
    return 0;
}
